package com.demo.design.stractural.flyweight.demo2;

public class TicketMain {

    public static void main(String[] args) {
        TicketFactory ticketFactory = new TicketFactory();

        Ticket ticket = ticketFactory.getTicket("hangzhou", "xian");
        ticket.showPrice("软卧");
        Ticket ticket1 = ticketFactory.getTicket("hangzhou", "xian");
        ticket1.showPrice("硬卧");
        Ticket ticket2 = ticketFactory.getTicket("hangzhou", "xian");
        ticket2.showPrice("站票");
    }
}
